{extend name="layout" /}
{block name="content"}
<div class="row">
  <div class="col-xs-3">
    <form>
    <div class="input-group input-group-sm">
        <input type="text" class="form-control input-sm" name="keywords">
        <span class="input-group-btn">
          <button type="button" class="btn btn-info btn-flat searchBtn" pageid="pages">搜  索</button>
          <!-- <button type="button" class="btn btn-danger btn-flat cocoModal" isForm url="{:url('search')}">高级搜索</button> -->
        </span>
    </div>
    <input type="hidden" name="fieldset" value="keywords-realname|username-like">
    </form>
  </div>
  <div class="col-xs-9" style="text-align: right">
    <button type="button" class="btn btn-success btn-sm cocoModal" isForm url="{:url('add')}" title="新增项目" fixat="1"><i class="fa fa-plus"></i> 新增</button>
    {eq name="uinfo.roleid" value="6"}
    <button type="button" class="btn btn-success btn-sm cocoModal" isForm url="{:url('add_subord')}" title="新增项目" fixat="1"><i class="fa fa-plus"></i> 添加经纪人</button>
    {/eq}
  </div>
</div>
<table class="layui-table" lay-data="{height: 'full-75', cellMinWidth: 80, page: true, limit:30, url:'{:url('data_show')}'}" lay-filter="lists"> 
  <thead>
    <tr>
      <th lay-data="{type:'checkbox'}">ID</th>
      <th lay-data="{field:'userid', sort: true, fixed: 'right', width:80, align:'center'}">UID</th>
      <th lay-data="{field:'realname'}">姓名</th>
      <th lay-data="{field:'totalnums'}">提交线索数量</th>
      <th lay-data="{field:'sucrate'}">成功率</th>
      <th lay-data="{field:'ineffrate'}">无效率</th>
      <th lay-data="{fixed: 'right', width:180, align:'center', toolbar: '#barDemo'}">操作</th>
    </tr>
  </thead>
</table>
<script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  <!-- <a class="layui-btn layui-btn-xs" lay-event="auth_manage">权限管理</a> -->
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
{/block}
{block name="script"}
<script type="text/javascript">
  function auth_manage(data) {
    var layindex = layer.open({
        type: 2,
        area: ['500px', '400px'],
        fixed: false, //不固定
        maxmin: true,
        content: APP_URL+"/admin/adminuser/user_auth?items="+data.id,
        title:'权限管理',
        shade: [0.8, '#000000']
      });
  }
</script>
{/block}